﻿package problemfactories;

import helpers.NotImplementedException;
import problems.producerconsumer.*;

public class ProducerConsumerFactory implements IProblemFactory<AbstractProducerConsumer>
{
    public ProducerConsumerFactory()
    {
    }

    @Override
    public AbstractProducerConsumer getSolution()
    {
        return new ProducerConsumerSolution();
    }

    @Override
    public AbstractProducerConsumer getSolutionWithDeadlock()
    {
        return new ProducerConsumerWithDeadlock();
    }

    @Override
    public AbstractProducerConsumer getSolutionWithRaceCondition()
    {
        return new ProducerConsumerWithRaceCondition();
    }

    @Override
    public AbstractProducerConsumer getSolutionWithDatarace() throws NotImplementedException
    {
        throw new NotImplementedException();
    }
}